import request from '@/utils/request'

// 秒杀下单
export const seckillOrder = (productId) => {
  return request({
    url: `/seckillOrder/add/${productId}`,
    method: 'post'
  })
}

// 获取当前用户秒杀订单列表
export const getSeckillOrderList = () => {
  return request({
    url: '/seckillOrder/list',
    method: 'get'
  })
}

// 支付秒杀订单
export const paySeckillOrder = (id) => request.post(`/seckillOrder/pay/${id}`)
// 取消秒杀订单
export const cancelSeckillOrder = (id) => request.post(`/seckillOrder/cancel/${id}`)
// 退款秒杀订单
export const refundSeckillOrder = (id) => request.post(`/seckillOrder/refund/${id}`)
// 完成秒杀订单
export const completeSeckillOrder = (id) => request.post(`/seckillOrder/complete/${id}`) 